import { PlainObject } from '@/bean/base';
import { App } from 'vue';
import { focus } from './focus';
// import Lazyload from './lazyload';
import { debounce, throttle } from './throttleOrdebounce';

// 自定义指令,考虑到节流防抖两个自定义指令写在一起
const directives: any = {
  debounce,
  throttle,
  focus,
};
export default {
  install(app: App): void {
    Object.keys(directives).forEach((key) => {
      app.directive(key, directives[key]);
    });
  },
};
